package com.sunmnet.j2ee.entity.powerdb.designer;

import com.sunmnet.j2ee.entity.base.BaseAutoEntity;
import org.apache.commons.lang.builder.ReflectionToStringBuilder;
import org.apache.commons.lang.builder.ToStringStyle;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;

import javax.persistence.Column;
import javax.persistence.Table;
import java.io.Serializable;


@javax.persistence.Entity
@Table(name = "pdm_entity")
@DynamicInsert(true)
@DynamicUpdate(true)
public class Entity extends BaseAutoEntity implements Serializable {

    private static final long serialVersionUID = -2722573992475040039L;

    private Long createAccountId;
    private Long modifyAccountId;
    private String nameCn;
    private String name;
    private short type;
    private short engine;
    private String remark;
    private String script;
    private Long moduleId;
    private Long projectId;
    private float xPosition;
    private float yPosition;
    private Long databaseId;
    private Long versionId;

    @Column(name = "version_id")
    public Long getVersionId() {
        return versionId;
    }

    public void setVersionId(Long versionId) {
        this.versionId = versionId;
    }


    @Override
    public String toString() {
        return new ReflectionToStringBuilder(
                this,
                ToStringStyle.DEFAULT_STYLE)
                .toString();
    }
    @Column(name = "create_account_id")
    public Long getCreateAccountId() {
        return createAccountId;
    }

    public void setCreateAccountId(Long createAccountId) {
        this.createAccountId = createAccountId;
    }
    @Column(name = "modify_account_id")
    public Long getModifyAccountId() {
        return modifyAccountId;
    }

    public void setModifyAccountId(Long modifyAccountId) {
        this.modifyAccountId = modifyAccountId;
    }

    @Column(name = "name_cn")
    public String getNameCn() {
        return nameCn;
    }

    public void setNameCn(String nameCn) {
        this.nameCn = nameCn;
    }
    @Column(name = "name")
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }
    @Column(name = "type")
    public short getType() {
        return type;
    }

    public void setType(short type) {
        this.type = type;
    }
    @Column(name = "engine")
    public short getEngine() {
        return engine;
    }

    public void setEngine(short engine) {
        this.engine = engine;
    }
    @Column(name = "remark")
    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }
    @Column(name = "script")
    public String getScript() {
        return script;
    }

    public void setScript(String script) {
        this.script = script;
    }
    @Column(name = "module_id")
    public Long getModuleId() {
        return moduleId;
    }

    public void setModuleId(Long moduleId) {
        this.moduleId = moduleId;
    }
    @Column(name = "project_id")
    public Long getProjectId() {
        return projectId;
    }

    public void setProjectId(Long projectId) {
        this.projectId = projectId;
    }
    @Column(name = "x_position")
    public float getxPosition() {
        return xPosition;
    }

    public void setxPosition(float xPosition) {
        this.xPosition = xPosition;
    }
    @Column(name = "y_position")
    public float getyPosition() {
        return yPosition;
    }

    public void setyPosition(float yPosition) {
        this.yPosition = yPosition;
    }

    @Column(name = "database_id")
    public Long getDatabaseId() {
        return databaseId;
    }

    public void setDatabaseId(Long databaseId) {
        this.databaseId = databaseId;
    }
}
